#ifndef rendercontext_h__
#define rendercontext_h__
#include "math/matrix44.h"

namespace gecko
{

// forward declare types
class IEffect;

// Render context used for batching of geometry
class RenderContext
{
public:
	// Begin rendering
	void Begin();

	// End rendering
	void End();

	// Get the number of passes used in the effect
	unsigned int GetNumPasses();

	// Begin the indexed pass
	void BeginPass(unsigned int pass);

	// End the current pass
	void EndPass();

	// Set the effect to apply
	void SetEffect(IEffect* effect);

	// Set the view-projection matrix for this context
	void SetViewProjectionMatrix(const Matrix44& matrix);

	// Get the view-projection matrix for this context
	const Matrix44& GetViewProjectionMatrix() const;

	// Equality operator
	bool operator ==(const RenderContext& rhs)
	{
		return m_Effect == rhs.m_Effect;
	}

private:
	IEffect* m_Effect;
	Matrix44 ViewProjectionMatrix;
};

}// namespace gecko

#endif // rendercontext_h__